package com.retailshop.shopuser.mapper;

import com.retailshop.shopuser.entity.OwnerShareUser;
import com.retailshop.shopuser.entity.OwnerUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface UserOwnerMapper {

    OwnerUser selectByPrimaryKey(Integer id);

    OwnerUser selectIId(Integer id);

    List<OwnerUser> selectList(@Param("id")Integer id,@Param("no")String no,@Param("name")String name,@Param("phone")String phone,@Param("rankServiceId")Integer rankServiceId,@Param("rankShopId")Integer rankShopId);

    List<OwnerUser> selectList1(@Param("id")Integer id,@Param("no")String no,@Param("name")String name,@Param("phone")String phone);

    List<OwnerShareUser> selectOwnerUserShareList(Integer id);

    List<OwnerShareUser> selectOwnerUserShareRankList(@Param("id")Integer id,@Param("rankId")Integer rankId);

    List<OwnerShareUser> selectOwnerUserShareRankShopList(@Param("id")Integer id,@Param("rankId")Integer rankId,@Param("rankShopId")Integer rankShopId);

    int setShopOwnerI(OwnerUser userNo);

    int setOwnerAll(@Param("userNoId") int userNoId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<OwnerUser> selectListI();

    List<OwnerUser> selectListCI();

    List<OwnerUser> selectListOwner(@Param("rankServiceId") int rankServiceId);

    int setShopOwner(OwnerUser userNo);

    int clearUserShopShare();

    int insertShareI(@Param("id") int id);



    int insertShare(@Param("id") int id,@Param("rankId") int rankId);
    int setShopOwnerQualified(@Param("id") int id);

    List<OwnerUser> selectInOrderList();

    int setUserStar(@Param("u1") int u1,@Param("u2") int u2,@Param("s1") int s1,@Param("s2") int s2);

    int setActivation(@Param("num") int num);


}